import axios from 'axios'
export let getCity = ()=>{
   
    return axios.get("/location/ip?ak=Qbzk5IG6EmeEG7woYpuK95sxPWsQHOUD").then(res=>{
        return {
            type:"GET_City",
            payload:res.data.content
        }
    })

}

export let getListThunk = (callback)=>(dispatch)=>{
    // console.log(callback)
    axios.get("/ajax/comingList?ci=65&token=&limit=10&optimus_uuid=DC1CEEF0208E11EAA33E9D72FE214703A3FCC565628140E9A4664CC1E81550FC&optimus_risk_level=71&optimus_code=10").then(res=>{
        console.log(res.data)
        dispatch({
            type:"GET_ListData",
            payload:res.data.coming
        })
        callback();
    })
}
    


/*

    function test(){

        setTimeout(()=>{
            return "1111111"
        },1000)

    }
    test()

*/